package com.itheima.day04_api;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class jisuan {
    public static void main(String[] args) {
        String time = "2020-12-12 12:23:12";
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime parse = LocalDateTime.parse(time, dateTimeFormatter);
        LocalDateTime localDateTime = parse.plusYears(1)
                .plusMonths(2)
                .plusDays(3)
                .plusHours(4)
                .plusMinutes(8)
                .plusSeconds(45);
        DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH小时mm分钟ss秒");
        String format = localDateTime.format(dateTimeFormatter1);
        System.out.println(format);


    }
}
